import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '班级',
    align:"center",
    dataIndex: 'departName'
   },
   {
    title: '宿舍楼室别',
    align:"center",
    dataIndex: 'roomCode'
   },
   {
    title: ' 总分',
    align:"center",
    dataIndex: 'totalScore'
   },
   {
    title: '内务卫生得分',
    align:"center",
    dataIndex: 'healthScore'
   },
   {
    title: '晚寝纪律得分',
    align:"center",
    dataIndex: 'nightScore'
   },
   {
    title: '午休纪律得分',
    align:"center",
    dataIndex: 'noonScore'
   },
  
];
//查询数据
export const searchFormSchema: FormSchema[] = [
    {
      label: "时间段",
      field: 'range',
      component: 'JDictSelectTag',
      defaultValue:'week',
      componentProps:{
		  value:"today",
		  showChooseOption:false,
		  options:[
			{value:"week",label:"本周"},
			{value:"month",label:"本月"}
		  ]
      },
      //colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '楼栋',
    field: 'buildName',
    component: 'Input',
  },
  {
    label: '楼层号',
    field: 'storeyCode',
    component: 'Input',
  },
  {
    label: '房间号',
    field: 'roomCode',
    component: 'Input',
  },
  {
    label: '班级',
    field: 'departName',
    component: 'Input',
  },
  {
    label: '内务卫生得分',
    field: 'healthScore',
    component: 'InputNumber',
  },
  {
    label: '晚寝纪律得分',
    field: 'nightScore',
    component: 'InputNumber',
  },
  {
    label: '午休纪律得分',
    field: 'noonScore',
    component: 'InputNumber',
  },
  {
    label: '班级ID',
    field: 'deptId',
     component: 'JSelectDept',
  },
  {
    label: '打分日期',
    field: 'scoreDate',
    component: 'DatePicker',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  buildName: {title: '楼栋',order: 0,view: 'text', type: 'string',},
  storeyCode: {title: '楼层号',order: 1,view: 'text', type: 'string',},
  roomCode: {title: '房间号',order: 2,view: 'text', type: 'string',},
  departName: {title: '班级',order: 3,view: 'text', type: 'string',},
  healthScore: {title: '内务卫生得分',order: 4,view: 'number', type: 'number',},
  nightScore: {title: '晚寝纪律得分',order: 5,view: 'number', type: 'number',},
  noonScore: {title: '午休纪律得分',order: 6,view: 'number', type: 'number',},
  deptId: {title: '班级ID',order: 7,view: 'sel_depart', type: 'string',},
  scoreDate: {title: '打分日期',order: 8,view: 'date', type: 'string',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}

